package com.web.new12306.service.impl;

import java.sql.Connection;
import java.util.List;

import com.web.new12306.dao.OrderDaoByCaiyan;
import com.web.new12306.dao.impl.OrderDaoImplByCaiyan;
import com.web.new12306.pojo.Order;
import com.web.new12306.service.OrderServiceByCaiyan;
import com.web.new12306.util.DaoUtil;
/**
 * @author 蔡艳
 *
 */

public class OrderServiceImplByCaiyan implements OrderServiceByCaiyan{
	@Override
	public List<Order> queryOrders(Integer pages, Integer rows) {
		Connection conn=DaoUtil.getConnection();
		OrderDaoByCaiyan orderDaoByCaiyan=new OrderDaoImplByCaiyan();
		List<Order> list=orderDaoByCaiyan.select(conn, pages, rows);
		return list;
	}

	@Override
	public int number() {
		Connection conn=DaoUtil.getConnection();
		OrderDaoByCaiyan orderDaoByCaiyan=new OrderDaoImplByCaiyan();
		int number =orderDaoByCaiyan.number(conn);
		return number;
	}

	
}
